#include "counter.hpp"

void CounterTester::DataGenerate() {
  _input_data.resize(_num_size);
  std::random_device rd;
  std::mt19937 gen(rd());
  std::uniform_int_distribution<int> distrib(1, 10);
  for (size_t i = 0; i < _num_size; ++i) {
    _input_data[i] = distrib(gen);
  }
}

bool CounterTester::CheckResult() {
  if (_baseline_result.size() != _impl_result.size()) {
    return false;
  }
  size_t len = _baseline_result.size();
  bool ret = true;
  for (size_t i = 0; i < len; ++i) {
    if (_baseline_result[i] != _impl_result[i]) {
      ret = false;
    }
  }
  return ret;
}

